// 依赖实体类
const SafeNumber = require('../base/SafeNumber');
const SafeString = require('../base/SafeString');

// 配置类
const config = require('../../config').config;

/**
 * 实体类 User 用于修改用户信息
 */
class UserInfoUpdate {
    constructor(obj) {
        this.name = new SafeString(obj.name, 0, config.username_length).value;
        this.phone = new SafeString(obj.phone, 0, config.phone_length).value;
        this.password = new SafeString(obj.password, 1, config.phone_length).value;
    }
}

module.exports = UserInfoUpdate;